﻿using System;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;

namespace PuvBuilder
{
    public class PuvDbHelper
    {

        //private static System.Collections.Concurrent.ConcurrentDictionary<string, PuvDbHelper> 

        public static string DefaultConnectionStr { get; set; }

        public static IDbConnection GetDbConnection(string connectionStr = "default")
        {
            if (string.IsNullOrWhiteSpace(connectionStr) || connectionStr == "default")
            {
                connectionStr = DefaultConnectionStr;
            }
            var conn = new SqlConnection(connectionStr);
            return conn;
        }


    }


}
